from lxml import etree

f = open('1.html', mode='r', encoding='utf-8')
code = f.read()
f.close()

page = etree.HTML(code)
# print(page)
# rt = page.xpath('/html/body/div/ol/li')[0]
# print(rt)
# rts = page.xpath('/html/body/div[2]/ol/li[2]')[0]
# print(rts)
# print(etree.tostring(rts))

s = page.xpath('//body/div/ol/li[1]/a/@href')
print(s)
